AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )
include('shared.lua')

function ENT:Initialize()
	self.Entity:SetModel( "models//props_phx//box_amraam.mdl" )
	
	self.Cooldown = 4
	self.EnergyDraw = 20

	if self.Entity.DamageType == "normal" then
		self.Entity.Damage = 200
	else
		self.Entity.Damage = 400
	end
	
	if (self.Entity.OrdinanceName == "ordinance_missile_intercept") then
		self.Entity.MissileType = "Interceptor"
	elseif (self.Entity.OrdinanceName == "ordinance_missile_blast") then
		self.Entity.MissileType = "Blast"
		self.Entity.BlastRadius = 120
	elseif (self.Entity.OrdinanceName == "ordinance_missile_cluster") then
		self.Entity.MissileType = "Bus"
	end
	
	self.BaseClass.Initialize(self)
end

function ENT:DrawFireEffect()
end

function Ordinance_Missile_Duplicate(player, position, angles, DamageType, Color, MissileType)
	local newentity = ents.Create("weapon_ordinance_missile")
	newentity:SetPos(position)
	newentity:SetAngles(angles)
	newentity:SetPlayer(player)
	newentity.DamageType = DamageType
	newentity.Color = Color
	newentity.OrdinanceName = MissileType
	newentity:Spawn()
	return newentity
end

duplicator.RegisterEntityClass("weapon_ordinance_missile", Ordinance_Missile_Duplicate, "pos", "ang", "DamageType", "Color", "OrdinanceName")